#!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 题目：有 n 个整数，
# 使其前面各数顺序向后移 m 个位置，
# 最后 m 个数变成最前面的 m 个数


def f1():
    # from random import randint

    a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    n = 10
    m = 5
    b = [0] * m
    b += a
    print(a)
    print(b)
    for i in range(n, n + m):
        b[i % n] = b[i]
    for i in range(m):
        b.pop()
    print(b)


f = f1
if __name__ == "__main__":
    f()
